import React,{Component } from 'react' ;

export default (WrappedComponent,name)=>{
  class NewCommponent extends Component{
    static defaultProps={
        defaultV:name
    }
    constructor(props){
      super(props);
      this.state={
        data:""
      }
    }
    componentWillMount(){
      this.setState({ data:this.props.defaultV })
    }
    render(){
      return (
        <WrappedComponent data={this.state.data} />
      )
    }
  }
  return NewCommponent
}
